#include<stdio.h>
#include<unistd.h>
#include<stdlib.h>

int g_val=10;
int main(){
    pid_t pid=fork();
    if(pid<0){
        return -1;
    }
    else if(pid==0){
        g_val=100;
        printf("child val:%d %p\n",g_val,&g_val);
    }else{
        sleep(1);
        printf("parent val:%d %p\n",g_val,&g_val);
    }
    return 0;
}
